BOARD ?= FUTUREBOX
all: certs/ca-bundle.pem
	echo "Building for ESP32-S3 (Board: $(BOARD))"
	# xxd -i built/binary.pxt64 boot_bin.c
	# create idf_component.mk
	echo "dependencies:\n  espressif/mdns: \"~1.1.0\"\n  espressif/esp_tinyusb: \"^1.2\"\n  espressif/led_strip: \"^2.4.1\"\n  espressif/pwm_audio: \"^1.1.1\"\n" > main/idf_component.yml
	# idf.py fullclean
	# idf.py reconfigure
	LC_ALL=C.UTF-8 idf.py -DCONFIG_BOARD=$(BOARD) build
	base64 build/pxtapp.bin > build/pxtapp.b64

include certs.mk